Cartridge Refresh And Verify

ABSTRACT

A method according to one embodiment includes: deciding to perform a refresh operation on a media cartridge having a tape wrapped around a spool; determining which drive of a plurality of drives is available to perform the refresh operation; causing the media cartridge to be mounted to the available drive; causing the drive to unwrap the tape from the spool of the media cartridge to about an end of the tape; and causing the drive to wrap the tape back onto the spool after the unwrapping, wherein at least some data on the tape is overwritten with new data, and a verification operation is performed using the new data.

RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.12/189,623, filed on Aug. 11, 2008, and which is herein incorporated byreference.

BACKGROUND

The present invention relates to tape-based data storage, and moreparticularly, this invention relates to refreshing and/or verifyingmedia cartridges.

Data storage drives, such as data tape drives, record information to andread information from media, such as the data tape of a tape cartridge.Data storage drives are often used in conjunction with, for example, adata storage and retrieval system. One example of such a system is anautomated data storage library with robotic picking devices, whereinremovable media cartridges are selectively transported between storagecells and data storage drives in an automated environment. Herein,automated data storage library, data storage library, tape librarysystem, data storage and retrieval system, and library may all be usedinterchangeably.

Once requested, data that is stored on data storage media of anautomated data storage library typically is needed quickly. Thus, it isdesirable that an automated data storage library be maintained in anoperational condition on a continuous basis as much as possible. As aresult, user expectations have moved toward a concept of continuousavailability, such as the well known “24×7×365” availability.

One concern with maintaining tapes for prolonged periods is how to dealwith expansion and contraction. Tapes expand and contract as a functionof environmental factors such as humidity, temperature, etc. Over time,the expansion and contraction can be detrimental to the quality of thetape. However, there has heretofore been a lack of ways to avoid suchdamage.

A concern with reusing tapes for repeated data storage operations isthat the condition of the tape or cartridge is not readily apparent.There has heretofore also been a lack of ways to estimate the conditionof a cartridge or part thereof.

SUMMARY

A method according to one embodiment includes: deciding to perform arefresh operation on a media cartridge having a tape wrapped around aspool; determining which drive of a plurality of drives is available toperform the refresh operation; causing the media cartridge to be mountedto the available drive; causing the drive to unwrap the tape from thespool of the media cartridge to about an end of the tape; and causingthe drive to wrap the tape back onto the spool after the unwrapping,wherein at least some data on the tape is overwritten with new data, anda verification operation is performed using the new data.

A system according to one embodiment includes a processor operable to:receive an instruction to perform a verification operation on a mediacartridge having a tape wrapped around a spool; cause at least some ofthe tape to be unwrapped from the spool of the media cartridge; cause atleast some of the tape to be wrapped back onto the spool after theunwrapping; perform a verification operation during at least one of theunwrapping and wrapping; apply a time limit, wherein the verificationoperation is terminated if the time limit is reached; generate a qualitymetric based on the verification operation, wherein the quality metricis indicative of a quality of the media cartridge; and output thequality metric or derivative thereof, wherein the quality metric isgenerated based at least in part on a number of error events foundduring at least one of a servo verify and a data verify, wherein thequality metric or derivative thereof is a value in a range having atleast three values, wherein at least some data on the tape isoverwritten with new data while the media cartridge is mounted in adrive, and the verification operation is performed using the new data.

A system according to another embodiment includes a processor operableto: cause performance of a verification operation on a media cartridgehaving a tape wrapped around a spool, the verification operationincluding at least one of a servo verify and a data verify; generate aquality metric based on the verification operation, wherein the qualitymetric is generated based at least in part on a number of error eventsfound during the at least one of the servo verify and the data verify,the quality metric being different than the number of error events; andoutput the quality metric or derivative thereof to a user, the qualitymetric being indicative of a quality of the media cartridge, wherein thequality metric or derivative thereof is a value in a range having atleast three values.

Any of these embodiments may be implemented in a magnetic data storagesystem such as a data storage and retrieval system, which may includeone or more drives.

Other aspects and embodiments of the present invention will becomeapparent from the following detailed description, which, when taken inconjunction with the drawings, illustrate by way of example theprinciples of the invention.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

FIG. 1 is an isometric view of one embodiment of a data storage andretrieval system constructed in accordance with the present invention.

FIG. 2 is an isometric view of a tape drive utilized by the data storageand retrieval system of FIG. 1.

FIG. 3 is an isometric view of a removable tape cartridge used inconjunction with the tape drive of FIG. 2.

FIG. 4 is an isometric view of a storage module utilized by the datastorage and retrieval system of FIG. 1.

FIG. 5 is a schematic diagram of an alternate storage module utilized bythe data storage and retrieval system of FIG. 1.

FIG. 6 is an isometric view of an alternate removable tape cartridgeusable in conjunction with a tape drive.

FIG. 7 is an isometric view of another alternate removable tapecartridge usable in conjunction with a tape drive.

FIG. 8 is an isometric view of an alternate configuration of the storagemodule of FIG. 4 with a front door open and a rear door closed.

FIG. 9 is a reverse isometric view of the storage module of FIG. 8 withthe front door closed and the rear door open.

FIG. 10 is a front isometric view of a drive canister.

FIG. 11 is a rear isometric view of the drive canister of FIG. 10.

FIG. 12 is a process diagram depicting a method according to oneembodiment.

FIG. 13 is a process diagram depicting a method according to oneembodiment.

FIG. 14 is a process diagram depicting a method according to oneembodiment.

DETAILED DESCRIPTION

The following description is made for the purpose of illustrating thegeneral principles of the present invention and is not meant to limitthe inventive concepts claimed herein. Further, particular featuresdescribed herein can be used in combination with other describedfeatures in each of the various possible combinations and permutations.

Unless otherwise specifically defined herein, all terms are to be giventheir broadest possible interpretation including meanings implied fromthe specification as well as meanings understood by those skilled in theart and/or as defined in dictionaries, treatises, etc.

It must also be noted that, as used in the specification and theappended claims, the singular forms “a,” “an” and “the” include pluralreferents unless otherwise specified.

Described herein are several systems and methods for providing refreshand/or verification of media cartridges.

In one general embodiment, a method includes receiving an instruction toperform a verification operation on a media cartridge having a tapewrapped around a spool; unwrapping at least some of the tape from thespool of the media cartridge; after the unwrapping, wrapping at leastsome of the tape back onto the spool; during at least one of theunwrapping and wrapping (and preferably both, and possibly over severalcycles of unwrapping and wrapping), performing a verification operation;generating a quality metric based on the verification operation; andoutputting the quality metric or derivative thereof, such as a pass orfail indication; an instruction to set a pass/fail flag; a number, scoreor graphic illustrating to a user a general quality of the tape, etc.

In another general embodiment, a method includes performing averification operation on a media cartridge having a tape wrapped arounda spool, the verification operation including at least one of a servoverify and a data verify; generating a quality metric based on theverification operation; and outputting the quality metric or derivativethereof to a user, the quality metric being indicative of a quality ofthe media cartridge, wherein the quality metric or derivative thereof isa value in a range having at least three values and preferably manyvalues.

In yet another general embodiment, a method includes determining whetherto perform a refresh operation on a media cartridge having a tapewrapped around a spool, the determination being based on some predefinedcriteria other than a presently-desired read or write operation of userdata to or from a host; and performing the refresh operation byunwrapping the tape from the spool of the media cartridge to about anend of the tape, and after the unwrapping, wrapping the tape back ontothe spool.

In a further general embodiment, a method includes deciding to perform arefresh operation on a media cartridge having a tape wrapped around aspool; determining which drive of a plurality of drives is available toperform the refresh operation; mounting the media cartridge to theavailable drive; causing the drive to unwrap the tape from the spool ofthe media cartridge to about an end of the tape; and after theunwrapping, causing the drive to wrap the tape back onto the spool.

Referring to FIG. 1, a data storage and retrieval system 100 is shown.In the embodiment illustrated, data storage and retrieval system 100 isdepicted as a robotic library. The upper interface of controller 160allows data storage and retrieval system 100 to communicate with one ormore hosts 390 via link 350. Link 350 may comprise an Ethernet,Infiniband, TCP/IP, Fibre Channel-Arbitrated Loop, SCSI, ESCON, FICON,or the like, depending on the application. The lower interface ofcontroller 160 communicates with a plurality of drives that arepositioned in drive enclosures 130 and 140. Drive enclosures 130 and 140receive removable media cartridges 103 (e.g., see cartridges in FIGS. 3,6, and 7), via robotic pickers 110 and 120. The removable mediacartridges 103 may include or contain magnetic tape, optical tape,optical disk media, magneto-optical disk, CD, DVD, phase-change media,floppy disk, removable hard disk, electronic media, and the like.Robotic pickers 110 and 120 travel along rail 170 to move removablemedia cartridges 103 from inner storage wall 102 and outer storage wall104 to drive enclosures 130 and 140 for the purposes of reading and/orwriting data. Robotic pickers 110 and 120 also return the removablemedia cartridges 103 to storage walls 102 and 104.

An import/export station 172 includes access door 174 attached to theside of data storage and retrieval system 100. Access door 174 ispreferably pivotally attached to the side of data storage and retrievalsystem 100; however, access door 174 could be slidably or otherwiseattached. An operator panel or access station 150 permits a user tocommunicate directly with data storage and retrieval system 100. Theoperator access station 150 typically contains an LCD display, akeyboard or touch screen for user input, and circuits to monitor andcontrol the I/O station doors.

First power component 180 and second power component 190 each compriseone or more power supplies that supply power to pickers 110 and 120,controller 160, operator access station 150, and drive enclosures 130and 140 of data storage and retrieval system 100. Typically, at leastone of the power components 180 and 190 provides direct current (DC)power, since most computer peripheral devices use DC power. One of thepower components 180 and 190 may provide alternating current (AC) poweras well. Controller 160 is in communication with power components 180and 190, pickers 110 and 120, operator access station 150, driveenclosures 130 and 140, and data storage drives (see FIGS. 2, 10, 11) ofdata storage and retrieval system 100.

Referring now to FIG. 2, a typical reel-to-reel tape drive 200 is shown.As described above, any removable media data storage drive may be used,such as tape drives, optical and magnetic disk drives, electronic mediadrives, or any other drives and media as is known to those skilled inthe art. A plurality of drives 200 are usually located inside of thelibrary 100 of FIG. 1. Tape drive 200 may be any one of, for example, afamily of tape drives using a single-reel tape cartridge, such as theIBM 3480, IBM 3490, IBM 3590, IBM 3592, Digital Linear Tape (DLT), andLinear Tape Open (LTO) tape drives. Cartridge loader 202 receives asingle-reel tape cartridge 301 (see FIG. 3) and threader 204 threads theleader-block 303 of the tape 305 around the tape guides 206 and 208, andaround the tape tension transducer 212, and into the take-up reel 214.Tape guides 206 and 208 support the tape as the tape moves over themagnetic tape head 210. All of these components are supported by baseplate 220. One or more tape drives 200 are located inside driveenclosures 130, 140 (FIG. 1) in order to protect the tape drives 200from dust and debris, as well as extraneous air currents that coulddisturb the way the magnetic tape 305 passes over the magnetic head 210.

The data storage and retrieval system 100 of FIG. 1 is typicallyassembled from a series of frames or storage modules 101, such as theL-frame type storage module illustrated in FIG. 4. A storage module isan expansion component of the library. Frames, accessors, magazines,etc. may comprise examples of storage modules. The storage module maycomprise one or more of the following: one or more storage shelves forholding data storage media, one or more data storage drives for readingand/or writing data on the data storage media, one or more import/exportstations for operator access to the data storage media, one or moreaccessors for moving the data storage media to/from data storage drivesand storage shelves, one or more frames or compartments for holdingadditional storage modules or library components. In the example of FIG.1, the desired number of storage modules 101 are assembled into datastorage and retrieval system 100. Storage module 101 comprises a picker120, a drive enclosure 130, an inner storage wall 102, and an outerstorage wall 104. A plurality of removable storage media 103 are locatedin each storage wall 102, 104. In this example, removable storage media103 comprises tape cartridges, but may also comprise other types ofmedia such as those described above.

Removable storage media 103 are inserted via robotic pickers 110, 120into drive enclosures 130, 140 via entrances 131, 141 (FIG. 1),respectively, where removable storage media 103 are mounted inside thedata storage drive, such as tape drive 200 (FIG. 2) or data storagedrive 153 (FIGS. 8, 10 and 11). Each picker 110, 120 includes a gripperassembly having a bar code scanner for reading cartridge labels, orother means for identifying the cartridges. As best shown in FIG. 8, agripper assembly 901 may contain, for example, a plurality of grippers903. The grippers 903 are mounted in a cage that can pivot from one sideof the library to the other. This allows access to both storage walls905, 907 by either gripper.

Referring now to FIG. 5, a schematic diagram of an optional frame orstorage module known as a Linear Tape Open (LTO) D-frame 501 is shown.LTO D-frame 501 provides additional storage and may provide additionaldrives as well. The description is similar to that for storage module101, except that there may be zero to twelve tape drives for LTO tapecartridges 701 (FIG. 6). FIG. 7 shows another alternate removable tapecartridge 801 usable in conjunction with a tape drive. If no drives areinstalled, then no MCC and supporting circuits/ports will be installed.

To increase the storage capacity of data storage and retrieval system100, one or more cartridge storage devices 151 (FIG. 8) may be presentto store media cartridges. As used herein, a cartridge storage device isa device capable of holding several media cartridges (defined above) fortransportation, storage, and/or use in conjunction with a data storageand retrieval system 100. The cartridge storage device may be capable ofstoring a number of media cartridges, optionally with each cartridgestored on a transport mechanism that feeds the cartridge to the front ofthe cartridge storage device for access by the library picker 110, 120.

It must also be noted that the teachings herein can be applied to astandalone storage system, such as a tape drive connected to a hostsystem, e.g., via a SCSI or USB interface. Such storage system mayfunction in a conventional manner and provide further functionalityaccording to the teachings presented herein.

As noted above, it would be desirable to enable refreshing of mediacartridges and/or verification of the quality of the cartridge and thedata residing on the cartridge to varying degrees. Internal producttesting has revealed the importance of a physical refresh of the mediafor maintaining long term archive quality, where a refresh is defined asan unwinding of the tape from the spool of a media cartridge to about anend of the tape and then wrapping the tape back up around the spool,where about the end of the tape is some point within about the last 10%of the tape length able to be unwrapped from the spool, more preferablyto some point within about the last 3% of the tape length, even morepreferably to about an end of tape position marker, etc. In particularlypreferred approaches, the feature is automatically performed with simplepolicy setup, and may provide varying degrees of tape quality and/ordata quality checking at the same time.

With reference to FIG. 12, a method 1200 for coordinating readertransmissions is shown according to one embodiment. As an option, thepresent method 1200 may be implemented in the context of thefunctionality and architecture of FIGS. 1-11. Of course, the method 1200may be carried out in any desired environment. It should also be notedthat the aforementioned definitions may apply during the presentdescription.

With reference to FIG. 12, in operation 1202, an instruction to performa verification operation on a media cartridge having a tape wrappedaround a spool is received. The instruction may include a command,examples of which are described in more detail below.

The instruction may come from any source. For example, the instructionmay come from the drive itself, e.g., a drive induced command via an IBMStatistical Analysis and Reporting System (SARS) results. In anotherapproach, the instruction may come from a host, such as a SENDDIAGNOSTICS command sent via the host bus. In yet another approach, theinstruction may come from a library controller, such as a librarycommand via the library interface. In further approaches, drives maysupport this feature as a SCSI send diagnostic command and/or as aLibrary Interface command. Note that the parameter set may be similarbut the behaviors may be slightly different for the two command paths(SCSI vs. Library).

Various parameters that may be used in the instruction command arepresented in more detail below.

In operation 1204, at least some of the tape is unwrapped from the spoolof the media cartridge. Again, some or all of the tape may be unwrapped.After the unwrapping, at least some of the tape is wrapped back onto thespool. Note operation 1206. If a simple refresh is all that is desired,the process may stop here. Accordingly, a simple refresh may includeonly one unwrapping and wrapping. Other approaches may include multiplecycles of unwrapping and wrapping.

If verification is desired, then the process continues. In operation1208, preferably during at least one of the unwrapping and wrapping (andpreferably during both, and possibly over several cycles of unwrappingand wrapping), a verification operation is performed. More informationabout various types of verification operations is presented below.

In operation 1210, a quality metric is generated based on theverification operation. The quality metric, as discussed in more detailbelow, may represent a quality of: the cartridge overall, the tape mediatherein, and/or the customer and/or servo data written thereto.

The quality metric, or derivative thereof, is output in operation 1212.Illustrative quality metrics, or derivatives thereof, include a pass orfail indication; an instruction to set a pass/fail flag; a number, scoreor graphic illustrating to a user a general quality of the tape, etc.

Drive Command Parameters

For various command paths, the following common parameters may be issuedor returned. Note that these parameters are presented by way of example,and some, all, additional and/or other parameters of the same or othertype may be used in a particular implementation.

Refresh and/or Verify Eligibility

As an option, the drive may be polled, e.g., in Mode Sense or via thelibrary interface, to determine if the drive is eligible to perform (orat least assist in) a refresh and/or verification operation. In oneillustrative embodiment, a drive is eligible to perform a refresh ifsome predefined criteria are met. Illustrative criteria include whethera clean for performance flag is set. If the flag is not set, the driveis eligible.

Another illustrative eligibility criterion is that no tape alerts orSingle-Stream Interacting Machines (SIM) messages and/or Multiple-streamInteracting Machines (MIM) messages are currently active, and none weregenerated in a preceding number of mounts, e.g., in the last 10 mounts.Yet another illustrative eligibility criterion is that no perm of anykind (where a perm denotes a failed recovery attempt), includingload/unload fails, Read/Write (R/W) and servo perms, occurred in apreceding number of mounts, e.g., in the last 10 mount queue history. Afurther illustrative eligibility criterion is that no FormatIdentification (FID) and/or/Fault Symptom Code (FSC) is outstanding orwas posted in a preceding number of mounts, e.g., in the last 10 mounts.

A drive may remain ineligible until repair or reset if a number ofpreviously-attempted refresh operations failed, e.g., the last 3 refreshoperations in a row failed for any reason.

If the command is received and the drive is not eligible to perform theoperation, a check condition may be generated.

Refresh Type

As alluded to above, various refresh options may be made available. Aparameter field in the command may select the refresh type. Threerefresh options are described below, two of which include verificationoperations. Note that these are presented for illustrative purposes onlyand should not be construed as limiting. Moreover, verification can beperformed without performing a refresh, though generally the greatestbenefit is received by performing a verify operation with a refresh.

In a first approach, a media refresh only is performed. In aparticularly preferred embodiment, this option locates the end-of-tapemarker and then rewinds the tape back onto the spool. Preferably, noother checking is performed.

In a second approach, media refresh with servo verify is performed. Oneembodiment unwinds the tape to about the end of the tape, e.g., to theend-of-tape marker, and then rewinds the tape back onto the spool whileperforming a servo verify in both directions. Tapes tend to deterioratefrom the outer edges inwardly, so the outer servo tracks are preferablyused during the servo verify operation, though other servo tracks couldbe used. In one embodiment, the drive performs a servo locate with writecriteria checking to about the end of tape on the servo track closest tothe top edge, then rewinds with a similar operation on the servo tracknearest the bottom edge of the tape. During this process, error events,such as Stopwrite (SW), Position Error Signal (PES), Servo Pattern Error(SPE), and/or invalid Linear Position (LPOS) events, may be counted ornoted, and used or considered in the generation of the quality metric.Moreover, each of the events may be given a weighting, which may beapplied to the count value during calculation of the quality metric. Forexample, the weighted values may be summed to provide a 1 or 2 bytevalue which is the quality metric or used in further calculation of thequality metric.

In a third approach, media refresh with data verify is performed. In oneembodiment, all data on the tape is read, preferably in logical wraporder. In another embodiment, only selected data is read, e.g., everysecond or third set of tracks, etc. In yet another embodiment, at leastsome data on the tape is overwritten with new data, and the verificationoperation is performed using the new data. This latter case is mostuseful when the data already on the tape is no longer needed and thegeneral condition of the tape is desired to be determined.

The drive may use Command Memory (CM) information, Housekeeping Data(HKD), etc. as it normally would to read a tape. Preferably, ErrorRecovery Procedure (ERP) actions are enabled. In particularly preferredembodiments, ERP actions are time-limited to simple ERPs, and a timelimit per ERP may be imposed, e.g., 10 seconds.

Read perms, temps, and/or other error counters may be monitored and thecorresponding counts or values may be used or considered in calculatingthe quality metric.

Where multiple unwind/wind cycles are performed, a simple refreshoperation is preferably performed on the cartridge as a last step so asto avoid interrupting the refresh.

Time Limit

A time limit may be imposed if desired. For example, it may beundesirable to keep a drive occupied with verification operations beyonda certain time limit. Accordingly, a time limit may be added to thecommand or otherwise applied. In particularly preferred approaches, thetime limit field is only valid if refresh with data verify mode isselected, as most issues with excessive duration will arise during dataverify mode. For example, ERPs may significantly increase the time toperform the verification process. If the time expires before completionof the verification process, the verification operation is terminated.For example, the drive may interrupt the operation at the next wrapboundary, record the checkpoint and checkpoint status, and complete thecommand and/or remaining steps in the process.

Media Quality and Media Pass/Fail

As noted above, a quality metric, or derivative thereof, is output e.g.,to a user; to another process; to memory or storage for later use;stored on the media cartridge itself, e.g., in a memory thereof, on thetape medium itself, etc.; etc. Illustrative quality metrics, orderivatives thereof, include a pass or fail indication; an instructionto set a pass/fail flag; a number, score or graphic illustrating to auser a general quality of the tape, etc. The quality metric mayrepresent a quality of: the cartridge overall, the tape media therein,the customer and/or servo data written thereto, etc.

In one approach, illustrated generally in FIG. 13, operation 1302 of amethod 1300 according to one embodiment includes performing averification operation on a media cartridge having a tape wrapped arounda spool, the verification operation including at least one of a servoverify and a data verify. In operation 1304, a quality metric isgenerated based on the verification operation. In operation 1306, thequality metric or derivative thereof is output to a user, the qualitymetric being indicative of a quality of the media cartridge. Forexample, the quality metric may provide some indication of the qualityof the media cartridge (or component part thereof) in terms of, e.g.,its suitability for use for further recording, an integrity of the servotracks on the tape, an integrity of the customer data on the tape(without requiring a full compare of the data to the source files), etc.Preferably, the quality metric or derivative thereof is a value in arange having at least three values and preferably many values.

In one illustrative embodiment, a Media Quality return parameter is aquality metric with a returned value from x‘00’ to x‘FF’, where x‘00’ isthe best quality and x‘FF’ is the poorest quality. Preferably, for theMedia Refresh operation only, this field always returns x‘00’.

The system may also return a Pass/Fail indication. In one approach, afail flag is set if the media quality exceeds the fail qualitythreshold. For example, a default for this threshold is d‘200’.Preferably, for full read verify, a read perm or many read temps maygenerate a fail status. Preferably, for two wrap servo verify, SW andSPE may exceed some threshold to fail, e.g., 10× the manufacturingspecification.

The fail flag may also be set if a time limit was exceeded. This maycorrespond to an excessive amount of ERP actions, indicating a poorstate of the cartridge.

Step Complete and Sequence Complete

The Step Complete return code indicates that the operation in progresswas successful.

The Sequence Complete return code indicates that the last stepassociated with a refresh is complete and the entire operation iscompleted. When this bit is set, the Media quality and Pass/Fail valuesare valid.

Drive Command Execution

In one illustrative embodiment, the drive command execution proceeds asfollows. The drive is polled for eligibility by the host/library beforecommand invocation. From the host invocation, a cartridge may be mountedand in the ready state. The Send Diagnostic command is received, and ifthe drive is eligible, and the parameter fields associated with thecommand are valid, the command execution is started. During the command,the drive reports busy status for all other host commands except SendDiagnostic abort sequence.

At the end of the command after status is reported, the cartridge isreturned to load point/ready status. During the operation, the cartridgeis treated as a write protected cartridge and no fields or data arealtered with the exception of the CM fields associated with the verifyoperation. The processing of a refresh operation does not effect orcause event logging in hardware or media SARS queues, although allccSARS counters are maintained for the duration of the mount.

To support interruptible full verify commands, the drive may support aCommand Abort sequence which may be issued to stop a refresh commandalready in progress. During a command abort sequence, the drive stopsthe current operation on the next wrap boundary and return status. Theprogress wrap, partial media quality, and validity indicator may bestored, e.g., in new fields in the CM, to allow re-start from theaborted position.

The timeout of the timer value may be treated as an abort. The host orlibrary program preferably remembers all steps that are not completed onthe cartridge (e.g., by checking the sequence complete bit) and is ableto reload at a future time for command completion by re-invocation ofthe command.

Library Control Scenario

An illustrative, basic operational summary of a successful sequence fromthe library follows. Again, the following is presented by way of exampleonly.

With reference to the method 1400 of FIG. 14, a determination is made asto whether to perform a refresh operation on a media cartridge having atape wrapped around a spool, the determination being based on somepredefined criteria other than a presently-desired read or writeoperation of user data to or from a host. Note operation 1402. Inoperation 1404, the refresh operation is performed.

The library or other storage system maintains several data fields, whichmay include some or all of the following:

-   -   A “Day Last Processed ” field for all physical volumes in        inventory. This indicates the day the last host mount or library        refresh was performed on a physical volume. Resolution to the        day is envisioned to be adequate, though could be higher or        lower.    -   A “Media Verification Quality” value.    -   A “refresh policy period” system global value.    -   A “refresh required” flag for each physical volume.    -   An “exclude from refresh” flag for each physical volume.    -   An “available for refresh” flag for each drive.    -   A mechanism to generate alerts to users.

The user may establish a “refresh” period policy in the librarysoftware. Typically this period would be programmable from 1 to 5 yearsin duration, but could be longer or shorter. Accordingly, thedetermination about whether to perform a refresh operation and/orverification may be made automatically based at least in part on a dateof last use of the media cartridge. The last use can include a last reador write operation, a last refresh of the cartridge, a last verificationoperation, etc.

When a cartridge has not been mounted in the policy period, a flag maybe set in library physical volume meta-data indicating a refreshoperation is desired or required on a given volume. This preferably flagremains set until the refresh is complete, or the cartridge has beenmounted before a refresh is performed, or the cartridge is exported orotherwise no longer available for refresh. Additionally, a mechanism maybe provided to allow users to exclude or include individual cartridgesfrom the auto-refresh process.

When a cartridge is marked for refresh and the “refresh required” flagis set, the library determines which drives are currently available toperform the refresh. Any unmounted drives are potentially eligible forrefresh operations; however, a mechanism may be provided to include,exclude, or limit the number of drives eligible for auto-refresh toprevent overall system performance impacts. Also, any fenced or poorquality drives may be excluded from the target drive pool. This can bedone by checking the Refresh Eligibility status of the drive.

When a target drive is available and eligible, the library mounts thetarget cartridge to the available drive (managed like any other librarymount) and issues a refresh/verify command; the volume is markedunavailable for the period it is mounted and the drive will busy/queuehost commands just as if a cleaning operation is in progress.

The drive performs the refresh and/or verify operation. In general, thisoperation may be the first step of a multi-step verification or theentire process if a refresh operation. The duration of this step ispreferably limited, e.g., held to 5 minutes or less, to preventnon-predictive drive/cartridge access contention. The driveautomatically unloads the cartridge as soon as the operation iscomplete.

When the drive completes the operation, a status is returned to thelibrary. The status contains a Step Complete and Sequence completecodes. The Step Complete code is a field that indicates the success orfailure of the command step. This indicates if the physical operationwas completed successfully. The Sequence Complete code is a field thatindicates if the entire operation is complete, or additional mounts arerequired for a multi-step operation.

The library dismounts the tape and updates status fields and evaluatesthe returned status. If the returned status for media quality includes aquality metric, or derivative thereof, that is yellow or red, e.g.,beyond a satisfactory threshold or failing, the tape may be scheduledfor a second drive verify. If the second drive verify fails, a TapeAlert or MIM status message for the volume may be generated or othererror reporting action taken.

Error Cases

In general, any drive error may result in termination of theverification operation and immediate unload. Further, a bad statusreport may be sent back to the library on the Completion Code along withnull values for media quality.

Drive Errors

If tape is stuck in the drive, the library can reset the drive viaserial command and recover the cartridge. If not, an error status may bereturned, e.g., just as if a cleaner had gotten stuck in the drive.Also, the library may mark the cartridge as unavailable and generate anerror alert of some type to notify the user.

If the drive cannot come ready, the verification operation may terminateand the tape is unloaded. If a power down or reset occurs during theverification operation, Graceful Dynamic Braking (GDB) and mid-taperecovery may unload the cartridge. Library logic can potentiallydetermine this and recover. Library interface failures may be treated astest termination and the tape unloaded.

In general, unrecoverable drive errors may be treated as they would ifthey occurred during a clean operation.

Media Errors

Completion code failures may be scheduled for second drive verify.Yellow/red quality results may be scheduled for second drive verify.Media quality may be directly presented on the web interface. Erroralerts or SMI-S messages can be generated (if there is someone orsomething to receive them) for double failures.

The library may also automatically perform a copy of the problem tape toanother tape.

It should be noted that, the invention can take the form of anembodiment containing both hardware and software elements. In oneembodiment, the invention may be implemented in software, which includesbut is not limited to firmware, resident software, microcode, etc.

Furthermore, the invention can take the form of a computer programproduct accessible from a computer-usable or computer-readable mediumproviding program code for use by or in connection with a computer orany instruction execution system. For the purposes of this description,a computer-usable or computer readable medium can be any apparatus thatcan contain, store, communicate, propagate, or transport the program foruse by or in connection with the instruction execution system,apparatus, or device.

The medium can be an electronic, magnetic, optical, electromagnetic,infrared, or semiconductor system (or apparatus or device) or apropagation medium. Examples of a computer-readable medium include asemiconductor or solid state memory, magnetic tape, a removable computerdiskette, a random access memory (RAM), a read-only memory (ROM), arigid magnetic disk and an optical disk. Current examples of opticaldisks include compact disk—read only memory (CD-ROM), compactdisk—read/write (CD-R/W) and DVD.

A data processing system suitable for storing and/or executing programcode will include at least one processor coupled directly or indirectlyto memory elements through a system bus. The memory elements can includelocal memory employed during actual execution of the program code, bulkstorage, and cache memories which provide temporary storage of at leastsome program code in order to reduce the number of times code must beretrieved from bulk storage during execution.

Input/output or I/O devices (including but not limited to keyboards,displays, pointing devices, etc.) can be coupled to the system eitherdirectly or through intervening I/O controllers. Network adapters mayalso be coupled to the system to enable the data processing system tobecome coupled to other data processing systems or remote printers orstorage devices through intervening private or public networks. Modems,cable modem and Ethernet cards are just a few of the currently availabletypes of network adapters.

While various embodiments have been described above, it should beunderstood that they have been presented by way of example only, and notlimitation. Thus, the breadth and scope of a preferred embodiment shouldnot be limited by any of the above-described exemplary embodiments, butshould be defined only in accordance with the following claims and theirequivalents.

1. A method, comprising: deciding to perform a refresh operation on amedia cartridge having a tape wrapped around a spool; determining whichdrive of a plurality of drives is available to perform the refreshoperation; causing the media cartridge to be mounted to the availabledrive; causing the drive to unwrap the tape from the spool of the mediacartridge to about an end of the tape; and causing the drive to wrap thetape back onto the spool after the unwrapping, wherein at least somedata on the tape is overwritten with new data, and a verificationoperation is performed using the new data.
 2. A method as recited inclaim 1, wherein the verification operation includes reading outer servotracks on the tape.
 3. A method as recited in claim 1, wherein theverification operation includes reading data tracks on the tape.
 4. Amethod as recited in claim 3, wherein all data tracks on the tape areread.
 5. A method as recited in claim 3, wherein error recoveryprocedures are performed during the verification.
 6. A method as recitedin claim 1, further comprising determining an eligibility of a drive toperform the wrapping and unwrapping and at least assist in theverification operation.
 7. A method as recited in claim 1, furthercomprising generating a quality metric based on the verificationoperation, wherein the quality metric is indicative of a quality of themedia cartridge.
 8. A method as recited in claim 7, wherein generatingthe quality metric includes consideration of at least one of a number ofstopwrite events, a number of servo pattern error events, and a numberof linear position error events.
 9. A method as recited in claim 7,wherein generating the quality metric includes consideration of at leastone of a number of read perms, a number of read temps, and a number ofreading errors.
 10. A system, comprising: a processor operable to:receive an instruction to perform a verification operation on a mediacartridge having a tape wrapped around a spool; cause at least some ofthe tape to be unwrapped from the spool of the media cartridge; cause atleast some of the tape to be wrapped back onto the spool after theunwrapping; perform a verification operation during at least one of theunwrapping and wrapping; apply a time limit, wherein the verificationoperation is terminated if the time limit is reached; generate a qualitymetric based on the verification operation, wherein the quality metricis indicative of a quality of the media cartridge; and output thequality metric or derivative thereof, wherein the quality metric isgenerated based at least in part on a number of error events foundduring at least one of a servo verify and a data verify, wherein thequality metric or derivative thereof is a value in a range having atleast three values, wherein at least some data on the tape isoverwritten with new data while the media cartridge is mounted in adrive, and the verification operation is performed using the new data.11. A system as recited in claim 10, wherein the verification operationincludes reading outer servo tracks on the tape.
 12. A system as recitedin claim 11, wherein generating the quality metric includesconsideration of at least one of a number of stopwrite events, a numberof servo pattern error events, and a number of linear position errorevents.
 13. A system as recited in claim 10, wherein the verificationincludes reading data tracks on the tape.
 14. A system as recited inclaim 13, wherein all data tracks on the tape are read.
 15. A system asrecited in claim 13, wherein error recovery procedures are performedduring the verification.
 16. A system as recited in claim 13, whereingenerating the quality metric includes consideration of at least one ofa number of read perms, a number of read temps, and a number of readingerrors.
 17. A system as recited in claim 10, wherein the tape isunwrapped from the spool of the media cartridge to about an end of thetape.
 18. A system as recited in claim 10, further comprisingdetermining an eligibility of a drive to perform the wrapping andunwrapping and at least assist in the verification operation.
 19. Amethod as recited in claim 1, wherein the quality metric or derivativethereof is stored on the media cartridge.
 20. A system, comprising: aprocessor operable to: cause performance of a verification operation ona media cartridge having a tape wrapped around a spool, the verificationoperation including at least one of a servo verify and a data verify;generate a quality metric based on the verification operation, whereinthe quality metric is generated based at least in part on a number oferror events found during the at least one of the servo verify and thedata verify, the quality metric being different than the number of errorevents; and output the quality metric or derivative thereof to a user,the quality metric being indicative of a quality of the media cartridge,wherein the quality metric or derivative thereof is a value in a rangehaving at least three values.